import {RouterMount, createRouter} from 'uni-simple-router';

const router = createRouter({
    platform: process.env.VUE_APP_PLATFORM,
	// APP: {
	// 	holdTabbar: false,
	// 	rewriteFun: false,
	// 	animation: {
	// 		animationType: 'pop-in',
	// 		animationDuration: 300,
	// 	},
	// },
	encodeURI: false,
	routes: [...ROUTES.map(route => {
        // todo 单独路由拦截配置写这里
        return route
    }), {
        path: '/MDTest/:type',
        redirect:(to)=>{
            return {name:'MD'}
        }
    }]
});
//全局路由前置守卫
router.beforeEach((to, from, next) => {
    console.log('进入路由守卫', to)
	next();
});
// 全局路由后置守卫
// router.afterEach((to, from) => {
//     console.log('跳转结束')
// })

export default router